<!DOCTYPE html>
<html>
    @section("head")
        <head>
            <meta charset="utf-8">
            <title>@yield("title","Blog")</title>
            <meta name="csrf-token" content="{{ csrf_token() }}" />
            <!-- 新 Bootstrap 核心 CSS 文件 -->
            <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

            <!-- 可选的Bootstrap主题文件（一般不用引入） -->
            <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

            <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
            <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

            <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
            <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
            <meta charset="utf-8">

            <script>
                $.ajaxSetup({
                    headers: {
                        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                    }
                });
            </script>
        </head>

    @show
    <body>
    @section("fBody")
        <nav class="navbar navbar-default">
            <div class="col-sm-6 col-sm-offset-2">
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <a class="navbar-brand" href="/main">Blog</a>
                    </div>

                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li><a href="/article"><span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true"></span>文章</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon glyphicon-tasks" aria-hidden="true"></span>专题</a></li>
                            <form class="navbar-form navbar-left" role="search">
                                <div class="form-group">
                                    <input type="text" class="form-control" placeholder="搜索文章">
                                </div>
                                <button type="submit" class="btn btn-default">搜索</button>
                            </form>
                            <ul class="nav navbar-nav navbar-right">
                                {{--<li><a href="#">Link</a></li>--}}
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">管理<span class="caret"></span></a>
                                    @if(Session("user_name"))
                                    <ul class="dropdown-menu">
                                        <li><a href="#">用户中心</a></li>
                                        <li><a href="#">个人中心</a></li>
                                        <li><a href="/logout">登出</a></li>
                                    </ul>
                                    @else
                                        <ul class="dropdown-menu">
                                            <li><a href="/login">登陆</a></li>
                                            <li><a href="#">注册</a></li>
                                        </ul>
                                    @endif
                                </li>
                            </ul>
                    </div><!-- /.navbar-collapse -->
                </div><!-- /.container-fluid -->
            </div>
        </nav>
    @show
    @section("body")

    @show
    </body>

</html>